Class providing a shared library of Font objects to the system.
The FontManager is used to create, access, and destroy Font objects. The idea is that the
FontManager will function as a central repository for Font objects used within the GUI system,
and that those Font objects can be accessed, via a unique name, by any interested party within
the system.
*/
class CEGUIEXPORT FontManager : public Singleton<FontManager>
{
public:
/*!
\brief
Constructor for FontManager objects
*/
FontManager(void);
/*!
\brief
Destructor for FontManager objects
*/
~FontManager(void);
/*!
\brief
Return singleton FontManager object
\return
Singleton FontManager object
*/
static FontManager& getSingleton(void);
/*!
\brief
Return pointer to singleton FontManager object
\return
Pointer to singleton FontManager object
*/
static FontManager* getSingletonPtr(void);
/*!
\brief
Creates a new font from a font definition file, and returns a pointer to the new Font object.
\param filename
String object containing the filename of a 'font definition file' what will be used to create the new font
\param resourceGroup
Resource group identifier to pass to the resource provider when loading the font definition file.
\return
Pointer the the newly created Font object
\exception FileIOException thrown if there was some problem accessing or parsing the file \a filename
\exception InvalidRequestException thrown if an invalid filename was provided.
\exception AlreadyExistsException thrown if a Font already exists with the name specified, or if a font Imageset clashes with one already defined in the system.
\exception GenericException thrown if something goes wrong while accessing a true-type font referenced in file \a filename.
\exception RendererException thrown if the Renderer can't support a texture large enough to hold the requested glyph imagery.
\exception MemoryException thrown if allocation of imagery construction buffer fails.
Creates a new Font based on a true-type font, and returns a pointer to the new Font object.
\param name
String object containing a unique name for the new font.
\param fontname
String object containing the name and path of the true-type font to access.
\param size
Specifies the glyph size (point-size) for the new font.
\param flags
Some combination of FontFlag values to be used for the creation of this font.
\param resourceGroup
Resource group identifier to be passed to the resource provider when loading the font definition file.
\return
Pointer to the newly created Font object.
\exception AlreadyExistsException thrown if a Font already exists with the name specified, or if a font Imageset clashes with one already defined in the system.
\exception GenericException thrown if something goes wrong while accessing a true-type font referenced in file \a fontname.
\exception RendererException thrown if the Renderer can't support a texture large enough to hold the requested glyph imagery.
\exception MemoryException thrown if allocation of imagery construction buffer fails.